package me.lcc.demo.api;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestApi {
	@Value("${demo.name}")
	String flag;
	/**
	 * 测试接口服务的状态
	 * @param name
	 * @return
	 */
	@RequestMapping("/api/test/status")
	public Map<String, Object> status(String name){
		Map<String, Object> result = new HashMap<>();
		result.put("name", name);
		result.put("flag", flag);
		result.put("time", System.currentTimeMillis());
		return result;
	}
}
